home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Amiga Classic Collection
/
The Amiga Classic Collection - Disc 1.iso
/
Education
/
ED92-AmateurRadio3.DMS
/
ED92-AmateurRadio3.adf
/
DOS-LOCATOR
/
DPLC
< prev
next >
Wrap
Text File
|
1990-03-04
|
3KB
|
103 lines
GOTO DPLC
SELECTMENU:
CLS
PRINT:PRINT:PRINT " * SELECT PROGRAM *":PRINT:PRINT
PRINT " ....1...DISTANCE & POINTS FROM LOCATORS FOR CONTESTS.....1.... "
PRINT " ....2...CONVERT NGR TO LOCATOR & LAT/LONG................2.... "
PRINT " ....3...DISTANCE FROM LAT/LONG TO LAT/LONG...............3.... "
PRINT " ....4...CONVERT OLD & NEW LOCATORS TO LAT/LONG...........4.... "
PRINT " ....5....................................................5...."
PRINT " ....6....................................................6.... "
PRINT " ....7....................................................7.... "
PRINT " ....8....................................................8.... "
PRINT " ....9....................................................9.... "
0 PRINT:PRINT
R$=INKEY$
IF R$ = "1" THEN GOTO DPLC
IF R$ = "2" THEN LOAD "CNGRLLL",R
IF R$ = "3" THEN LOAD "DLLLL",R
IF R$ = "4" THEN LOAD "CONLLL",R
IF R$ <> "" GOTO SELECTMENU
SLEEP
GOTO 0
DPLC:
PI=3.1415926559#
CLS
GOSUB 13
PRINT #4, :PRINT #4," *DISTANCE & POINTS FROM LOCATORS FOR CONTESTS JAN90*"
PRINT #4,
1 INPUT "HOME LOCATOR";Q$:Q$=UCASE$(Q$)
PRINT #4,
GOSUB 11
IF F>.5 GOTO 1
E1=E:N1=N
CN=1:TD=0:TP=0:DX=0
BD=0:BC=0:OD=0:OC=0
PN=1
2 PP=0:PD=0:PC=0
PRINT #4,:PRINT #4," PAGE";PN;" ENTER SUMMARY (/) - MENU (*) ":PRINT #4,
3 PRINT #4," LOCATER/DX FOR QSO";CN;
M=1:INPUT Q$:Q$=UCASE$(Q$):IF Q$=""GOTO 3
IF Q$="/"GOTO 10
IF Q$="*"GOTO SELECTMENU
IF LEFT$(Q$,1)<>"-" GOTO 4
M=-1:Q$=MID$(Q$,2): IF Q$="" GOTO 7
4 F=0:FOR J=1 TO LEN(Q$):T$=MID$(Q$,J,1)
IF (T$<"0"OR T$> "9") AND T$<>"." THEN F=1
NEXT J
IF F>.5 GOTO 5
DX=VAL(Q$):IF DX<>0 GOTO 7
PT=0:GOTO 8
5 GOSUB 11:IF F<.5 GOTO 6
PRINT "BAD INPUT": GOTO 3
6 CO=SIN(N1)*SIN(N)+COS(N1)*COS(N)*COS(E1-E)
DX=ATN(ABS(SQR(1-CO*CO)/CO)):IF CO<0 THEN DX=PI-DX
DX=6371.291#*DX
7 PT=M*(1+2*INT(ABS(DX-1)/50)):DX=M*INT(DX)
8 PRINT #4,DX;" KM",PT;" POINTS":PRINT
TD=TD+DX:TP=TP+PT
PD=PD+DX:PP=PP+PT: PC=PC+M
CN=CN+M:IF DX>=0 GOTO 9
DX=-DX:IF DX<BD GOTO 3
PRINT #4," BEST DX CANCELLED ":BC=OC: BD=OD:GOTO 3
9 IF DX <=BD GOTO 3
PRINT #4," * NEW BEST DX *":PRINT
OD=BD: OC=BC:BD=DX:BC=CN-M:GOTO 3
10 T=CN-1:PRINT #4,:PRINT #4," TOTALS SO FAR:"
PRINT #4,T;" CONTACTS":IF T<1 THEN T=1
PRINT #4,TD;"KM",INT(TD/T);" KM/QSO"
PRINT #4,TP;" POINTS",INT(TP*100/T)/100;" POINTS/QSO"
T=PC:PRINT #4,:PRINT #4,"TOTALS FOR PAGE";PN
PRINT #4,T;"CONTACTS":IF T<1 THEN T=1
PRINT #4,PD;"KM",INT(PD/T);"KM/QSO"
PRINT #4,PP;"POINTS",INT(PP*100/T)/100;"POINTS/QSO"
PRINT #4,:PRINT #4,"BEST DX";BD;"KM, QSO NO";BC
PRINT #4,:INPUT "START A NEW PAGE";Q$:Q$=UCASE$(Q$)
IF LEFT$(Q$,1)<>"Y" GOTO 3
PN=PN+1:GOTO 2
11 F=1:IF LEN(Q$)<>6 THEN RETURN
T=1:GOSUB 12
E=N+N: IF F>.5 THEN RETURN
F=1:T=2:GOSUB 12
RETURN
12 N=ASC(MID$(Q$,T,1))-ASC("A")
IF N<0 OR N>17 THEN RETURN
T$=MID$(Q$,T+2,1)
IF T$<"0"OR T$>"9" THEN RETURN
N=N*10+ASC(T$)-ASC("0")
T$=MID$(Q$,T+4,1)
IF T$<"A" OR T$> "X"THEN RETURN
N=N*24+ASC(T$)-ASC("A")
N=N-2160+.5
N=N*PI/4320
F=0:RETURN
13 PRINT
INPUT"OUTPUT TO Printer or Screen (P/S)", P$
IF UCASE$(P$)<>"P"THEN 14
OPEN"LPT1:" FOR OUTPUT AS #4
RETURN
14 OPEN "SCRN:" FOR OUTPUT AS #4:RETURN